﻿Imports Core
Imports System.Diagnostics
Namespace Rendering
    Public Class MakeSubscriptionList
        Public Shared Function ReturnList(ByVal LoadList As Boolean) As String
            Try
                Dim b, c As String
                c = My.Computer.FileSystem.ReadAllText(API.ReturnTemplatePath() & "SubsList\subslist.htm")
                For Each Item As Database.FeedDBItem In [Global].Feeds
                    b = b & "&nbsp;" & "<a href=fm://feeds/item/" & Item.Guid & ">" & Item.Title & "</a><br />"
                Next
                c = c.Replace("{{#ITEMTITLE#}}", "Subscriptions")
                c = c.Replace("{{#SUBSCRIPTIONS#}}", b)
                c = c.Replace("{{#PATH#}}", API.ReturnTemplatePath() & "Subslist" & "/")
                c = c.Replace("{{#IMAGEPATH#}}", API.ReturnTemplatePath() & "Subslist" & "/images")
                c = c.Replace("\", "/")
                Return c
            Catch ex As Exception
                Debug.Print(ex.ToString)
            End Try
        End Function
    End Class
End Namespace
